<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:Orbifold.Trefoil"
    >
  <!--Style for the ribbon buttons.-->
  <Style TargetType="{x:Type Button}">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="UIElement.SnapsToDevicePixels" Value="True"/>
    <Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True"/>
    <Setter Property="FrameworkElement.MinHeight" Value="25"/>
    <Setter Property="FrameworkElement.MinWidth" Value="30"/>
    <Setter Property="Margin" Value="3"/>
    <Setter Property="TextElement.Foreground" Value="{StaticResource NormalForegroundBrush}"/>
    <Setter Property="Control.Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Button}">
          <Border
            Name="border" 
            CornerRadius="3" 
            BorderThickness="1" 
            BorderBrush="{StaticResource NormalBorderBrush}" 
            Background="{StaticResource NormalBackgroundBrush}">
            <ContentPresenter
                Margin="3"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
                RecognizesAccessKey="True"
                Content="{TemplateBinding ContentControl.Content}" />
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsPressed" Value="True">
              <Setter Property="Background" TargetName="border" Value="{StaticResource PressedBackgroundBrush}"/>
              <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource PressedBorderBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsPressed" Value="False"/>
                <Condition Property="IsMouseOver" Value="True"/>
              </MultiTrigger.Conditions>
              <Setter Property="Background" TargetName="border" Value="{StaticResource HighlightBackgroundBrush}"/>
              <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource PressedBorderBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
              <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <!--Style for the color picker-->
  <!--<Style TargetType="{x:Type local:ColorPicker}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type local:ColorPicker}">
          <Canvas>
            <Button Name="PART_ChooseButton" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Command="{x:Static local:ColorPicker.ChooseCommand}">
              <Rectangle Height="Auto" Width="Auto" Fill="Orange"/>
            </Button>
            <Popup Name="PART_Popup"  
                    PlacementTarget ="{Binding ElementName=PART_ChooseButton}" 
                    Placement="Bottom" Width="170" Height="Auto" >


              <StackPanel>
                <StackPanel.BitmapEffect>
                  <DropShadowBitmapEffect
                   ShadowDepth="4"
                   Direction="330"
                   Color="Black"
                   Opacity="0.5"
                   Softness="0.25" />
                </StackPanel.BitmapEffect>
                <ListBox BorderBrush="Black"  ItemsSource="{Binding Source={StaticResource colors}}" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                  <ListBox.ItemTemplate>
                    <DataTemplate>
                      <Rectangle Width="15" Height="15" Fill="{Binding}"/>
                    </DataTemplate>
                  </ListBox.ItemTemplate>
                  <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>

                      <WrapPanel/>

                    </ItemsPanelTemplate>

                  </ListBox.ItemsPanel>


                </ListBox>
                <Button Command="{x:Static local:ColorPicker.MoreCommand}" Name="PART_MoreButton"
                        Content="More..."  BorderBrush="Silver" BorderThickness="1">

                </Button>
              </StackPanel>
            </Popup>
          </Canvas>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>-->
</ResourceDictionary>